package com.title1;

import java.io.File;
import java.util.Scanner;

/**
 * @Author milian
 * @Date 2021/7/31 0031 20:17
 */
public class title1 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入文件路径:");
        String path = sc.nextLine();
        File file = new File(path);
        if (file.isFile()){
            System.out.println("这是个文件");
        }else if (file.isDirectory()){
            System.out.println("这是个文件夹");
        }else {
            System.out.println("该路径不存在！！！");
        }
    }
}
